package com.oreilly.ez.fileserver.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
@Table(name = "note_article")
public class NoteArticleVO {


    @Id
    @GenericGenerator(name = "jpa-uuid", strategy = "uuid")
    @GeneratedValue(generator = "jpa-uuid")
    private String sid;

    private String title;

//    @Lob
//    @Basic(fetch = FetchType.LAZY)
//    private String text;


    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @CreatedDate
    private Date ctime;

    @Column(name = "cate_id")
    private String cateId;

}
